<%@ page language="java" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			System.out.println(basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>" />

<title>项目hello</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<!-- stylesheets -->
<!-- <link rel="stylesheet" type="text/css" href="resources/css/reset.css" />
<link rel="stylesheet" type="text/css" href="resources/css/style.css"
	media="screen" />
<link rel="stylesheet" type="text/css"
	href="resources/css/style_full.css" />
<link id="color" rel="stylesheet" type="text/css"
	href="resources/css/colors/blue.css" /> -->
<link rel="stylesheet" type="text/css" href="resources/css/reset.css" />
<link rel="stylesheet" type="text/css" href="resources/css/style.css"
	media="screen" />
<link id="color" rel="stylesheet" type="text/css"
	href="resources/css/colors/blue.css" />
<!-- scripts (jquery) -->
<script src="resources/scripts/jquery-1.4.2.min.js"
	type="text/javascript"></script>
<!--[if IE]><script language="javascript" type="text/javascript" src="resources/scripts/excanvas.min.js"></script><![endif]-->
<script src="resources/scripts/jquery-ui-1.8.custom.min.js"
	type="text/javascript"></script>
<script src="resources/scripts/jquery.ui.selectmenu.js"
	type="text/javascript"></script>
<script src="resources/scripts/jquery.flot.min.js"
	type="text/javascript"></script>
<script src="resources/scripts/tiny_mce/tiny_mce.js"
	type="text/javascript"></script>
<script src="resources/scripts/tiny_mce/jquery.tinymce.js"
	type="text/javascript"></script>
<!-- scripts (custom) -->
<script src="resources/scripts/smooth.js" type="text/javascript"></script>
<script src="resources/scripts/smooth.menu.js" type="text/javascript"></script>
<script src="resources/scripts/smooth.chart.js" type="text/javascript"></script>
<script src="resources/scripts/smooth.table.js" type="text/javascript"></script>
<script src="resources/scripts/smooth.form.js" type="text/javascript"></script>
<script src="resources/scripts/smooth.dialog.js" type="text/javascript"></script>
<script src="resources/scripts/smooth.autocomplete.js"
	type="text/javascript"></script>
	<script type="text/javascript" src="My97DatePicker/WdatePicker.js"></script> 
 
  <script>
  function test() {
	
	var name = document.getElementById("name");
	var time_start = document.getElementById("start");
	var time_end = document.getElementById("end");

	
	if(name.value=="")
	{
	    alert("提示\n\任务名未填");
		window.form1.name.focus();
		return false;
	}
    if (time_start.value=="") {
		alert("提示\n\n开始时间未填！");
		window.form1.time_start.focus();
		return false;
	}
    if (time_end.value=="") {
		alert("提示\n\n结束时间未填！");
		window.form1.time_end.focus();
		return false;
	}
	if(time_start.value>time_end.value)
	{
	    alert("提示\n\n时间错乱。");
	    return false;
	}
	document.form1.submit();

}
</script>
</head>
<body>
 <div id="right">
		<div class="box">
			<div class="title">
				<h1>添加任务</h1>
			</div>
			
			<form  method="post" name="form1" action="admin/task!add">
    <table width="452" height="413" border="0" align="center">
      <tr>
        <td width="139"></td>
        <td width="273">  
        </td>
      </tr>
      <tr>
        <td ><div align=right>任务名：</div></td>
        <td >
           <input name="task_Dto.t_name" id="name" type="text" size="30"></input>
           <span style="color:red">*必填</span>
        
        </td>
      </tr>
      <tr>
        <td><div align="right">描述：</div></td>
        <td><input name="task_Dto.t_desc"  type="text" size="30"></input></td>
      </tr>
      <tr>
        <td><div align="right">开始时间：</div></td>
        <td>
          <input name="task_Dto.t_start" id="start" type="text"/> 
          <img   onClick="WdatePicker({el:$dp.$('start')})" src="My97DatePicker/skin/datePicker.gif" _fcksavedurl="My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">    </img>  </td>
      </tr>
      <tr>
        <td><div align="right">结束时间：</div></td>
        <td> 
          <input name="task_Dto.t_end"  id="end" type="text"/> 
          <img onClick="WdatePicker({el:$dp.$('end')})" src="My97DatePicker/skin/datePicker.gif" _fcksavedurl="My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"></img> </td>
      </tr>
      <tr>
        <td><div align="right">任务状态：</div></td>
        <td><select name="task_Dto.t_state"  >
          <option value="开始">任务开始</option>
          <option value="进行">正在进行</option>
          <option value="中断">任务中断</option>
          <option value="终止">任务终止</option>
          <option value="完成">任务完成</option>
                </select></td>
      </tr>
      <tr>
        <td><div align="right">备注：</div></td>
        <td width="322" height="60"><textarea name="task_Dto.t_temp"  cols="40" rows="8"></textarea></td>
      </tr>
      <tr>
        <td> 
          <div align="right">
            <input type="button" name="btn1" onclick="test()" value="提交" ></input>
          </div></td>
        <td><div align="center">
          <input name="Reset" type="reset" id="Reset" value="重置"></input>
        </div></td>
      </tr>
      
    </table>
  </form>
		</div>
	</div>
  
  </body>
</html>
